<?php
session_start();
$ime = $_GET['ime'];
$name = $_GET['name'];
$price = $_GET['price'];
if (isset($_SESSION['cart'][$ime])) {
    $_SESSION['cart'][$ime]['qty']++;
} else {
    $_SESSION['cart'][$ime]['qty'] = 1;
}

$_SESSION['cart'][$ime]["name"] = $name;
$_SESSION['cart'][$ime]["price"] = $price;
exit();
?>